package com.rem.designPattern.decorator装饰者;

/**
 * @author Rem
 * @date 2022-11-17
 */
public class Client {
    public static void main(String[] args) {
        FastFood fastFood = new FriedRice();
        System.out.println("点" + fastFood.getName() + "的价格是：" + fastFood.cost());

        fastFood = new Egg(fastFood);
        System.out.println("点" + fastFood.getName() + "的总价：" + fastFood.cost());

        fastFood = new Bacon(fastFood);
        System.out.println("点" + fastFood.getName() + "的总价：" + fastFood.cost());
    }
}